package com.qww.test05;

public class Lunch {

    public static void main(String[] args) {
        // Error:(6, 23) java: Soup1() 在 com.qww.test05.Soup1 中是 private 访问控制
        // Soup1 soup1 = new Soup1();
        Soup1 soup1 = Soup1.makeSoup();

        Soup2.access().f1();
    }
}

class Soup1 {
    private Soup1() {}
    public static Soup1 makeSoup() {
        return new Soup1();
    }
}

class Soup2 {
    private Soup2() {}
    private static Soup2 ps1 = new Soup2();
    public static Soup2 access() {
        return ps1;
    }

    public void f1() {}
}